#include <stdio.h>
#include <string.h>

#define STDIN
//#define DEBUG

#define STR_MAX_LEN 100001

int main()
{
#ifdef STDIN
    freopen("bin/1936.in", "r", stdin);
#endif

    char s[STR_MAX_LEN], t[STR_MAX_LEN];

    while(scanf("%s %s", s, t) == 2)
    {
#ifdef DEBUG
        printf("s: %s\nt:%s\n", s, t);
#endif
        int si, ti;
        int len_s = strlen(s);
        int len_t = strlen(t);

        for (si = 0, ti = 0; si < len_s && ti < len_t;)
        {
                if (s[si] == t[ti])
                {
                    si++;
                    ti++;
                }
                else
                {
                    ti++;
                }
        }
        if (ti <= len_t && si == len_s)
            printf("Yes\n");
        else
            printf("No\n");
    }
    return 0;
}
